package com.tlgen.orm.components.offHeap;

import com.tlgen.orm.utils.log.ColorLogger;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;

/**
 * 堆外存储配置初始化器
 * 确保在应用启动后正确初始化 OffHeapManager 的配置
 */
@Configuration
public class OffHeapInitializer implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        // 初始化堆外存储配置
        OffHeapManager.initConfiguration();

        // 打印初始化信息
        ColorLogger.printInfoMessage(ColorLogger.LIGHTNING + " OffHeapManager configuration initialized successfully");

    }

}